package cn.wen233.srpc.core.server;

/**
 * Socket实现的服务端
 *
 * @author wenei
 * @date 2021-10-28 20:32
 */
public abstract class AbstractServer implements Server {

    /**
     * 应用启动端口号
     */
    protected int port;

    @Override
    public void start(int port) {
        this.port = port;
        init();
        service();
    }

    /**
     * 留给子类实现具体的处理逻辑
     */
    protected abstract void service();

}
